#ifndef CONTRACTQUERYDIALOG_H
#define CONTRACTQUERYDIALOG_H

#include <QDialog>
#include <QLineEdit>
#include <QDateEdit>
#include <QSqlQueryModel>

#include "childwindowbase.h"

namespace Ui {
    class ContractQueryDialog;
}

class ContractQueryDialog : public ChildWindowBase{
    Q_OBJECT
public:
	explicit ContractQueryDialog(ChildWindowBase *parent = 0);
    ~ContractQueryDialog();
private slots:
	void onConditionChanged(int index);
	void onQueryButton();
	void onExportExcelButton();
	void onDeleteAction();
	void onEditAction();
protected:
    void changeEvent(QEvent *e);
private:
	void setupWidgets();
	void setupSignals();
private:
    Ui::ContractQueryDialog *ui;

	QSqlQueryModel *m_Model;

	QLineEdit *m_ContractIdEdit;
	QLineEdit *m_AdvertiserEdit;
	QDateEdit *m_DateEdit;
	QLineEdit *m_FeeEdit;

	QAction* m_DeleteAction;
	QAction* m_EditAction;

	QWidget* m_LastWidget;
};

#endif // CONTRACTQUERYDIALOG_H
